﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>厂商资料维护及查询</title>
    <script src="../../Script/boot.js" type="text/javascript"></script>
</head>
<body>
    <div class="mini-toolbar" style="text-align: center; line-height: 30px;" borderstyle="border:0;">
        <label>
            名称：</label>
        <input id="key" class="mini-textbox" style="width: 150px;" onenter="onKeyEnter" />
        <a class="mini-button" style="width: 60px;" onclick="search()">查询</a>
    </div>
     
    <div id="datagrid1" class="mini-datagrid" style="width: 100%; height: 200px;" allowresize="true"
        url="AjaxService.aspx?method=SearchEmployees" idfield="id" onrowdblclick="onRowDblClick">
        <div property="columns">
            <div field="factoryNo" width="120" headeralign="center" allowsort="true">
                厂商编号</div>
            <div field="factoryName" width="120" headeralign="center" allowsort="true">
                厂商名称</div>
            <div field="factoryCategoryName" width="120" headeralign="center">
                厂商类别</div>
        </div>
    </div>
     
    <div class="mini-toolbar" style="text-align: center; padding-top: 8px; padding-bottom: 8px;"
        borderstyle="border:0;">
        <a class="mini-button" style="width: 60px;" onclick="onOk()">确定</a> <span style="display: inline-block;
            width: 25px;"></span><a class="mini-button" style="width: 60px;" onclick="onCancel()">
                取消</a>
    </div>
    <script type="text/javascript">
        mini.parse();

        var grid = mini.get("datagrid1");
        grid.load();
        grid.sortBy("createDate", "desc");




        function search() {
            var key = mini.get("key").getValue();
            grid.load({ key: key });
        }
        function onKeyEnter(e) {
            search();
        }


        function GetData() {
            var row = grid.getSelected();
            return row;
        }

        function onRowDblClick(e) {
            onOk();
        }
        //////////////////////////////////
        function CloseWindow(action) {
            if (window.CloseOwnerWindow) return window.CloseOwnerWindow(action);
            else window.close();
        }

        function onOk() {
            CloseWindow("ok");
        }
        function onCancel() {
            CloseWindow("cancel");
        }
    </script>
</body>
</html>
